// ActionScript file

import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.rpc.events.ResultEvent;
import mx.rpc.remoting.mxml.RemoteObject;
public function test():void{
         
         try{
  var ro:RemoteObject=new RemoteObject("loginController");
             ro.endpoint="messagebroker/amf";
             ro.showBusyCursor=true;
             ro.addEventListener(ResultEvent.RESULT,doctorListBack);
             ro.login("jiaosha","dkkk");
	
         }catch(e:Error){
         	 Alert.show(e.toString());
         }
	
	
}


public function doctorListBack(evt:ResultEvent):void{

//	var list:ArrayCollection;
		var result:ArrayCollection = evt.result as ArrayCollection;    
	searchDataGrid.dataProvider=result;
	//Alert.okLabel="确定";
 //   Alert.show(result);
   
    
}